<?php

namespace V1\Model;


use Think\Exception;
use Think\Model;

class PayModel extends Model
{
    protected $tableName = 'pay';

    /**
     * 通过用户id获取充值记录
     * @param $uid
     * @param array $field
     */
    public function get_recharge_list($uid, $field)
    {
        $map['userid'] = $uid;
        $map['status'] = 1;
        $request = $this->where($map)->order('create_time desc')->field($field)->select();
        if ($request === false) {
            new Exception();
        } else {
            return $request;
        }
    }
}